<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Page
{
	var $ci;
	function __construct()
	{
		$this->ci = & get_instance();
		$this->ci->load->library('pagination');
	}
	
	function page_show($base_url,$total_rows,$per_page)
	{
		$config['base_url'] 		= $base_url;
		$config['total_rows'] 		= $total_rows;
		$config['per_page'] 		= $per_page;
		$config['uri_segment'] 		= 4;
		$config['cur_tag_open'] 	= '<span class="current">';
		$config['cur_tag_close'] 	= '</span>';
		$this->ci->pagination->initialize($config);
		return $this->ci->pagination->create_links();
	}
}